package com.chenfan.mcn.model.vo;

import com.chenfan.mcn.enums.LiveStarSettlementStatusEnum;
import com.chenfan.mcn.model.LiveStarSettlement;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;
import java.util.Objects;

/**
 * 直播红人结算单详情VO
 *
 * @author wulg
 * @date 2023/3/21
 **/
@EqualsAndHashCode(callSuper = true)
@Data
public class LiveStarSettlementDetailVO extends LiveStarSettlement {

    private static final long serialVersionUID = -555865166597777660L;
    /**
     * 单据状态名称
     */
    private String approvalStatusName;

    /**
     * 当前审批流程ID
     */
    private Long flowId;

    /**
     * 审批流程ID集合-含撤回等
     */
    private String flowIds;

    /**
     * 审批节点名称
     */
    private String flowStatusName;

    /**
     * 红人昵称
     */
    private String starNickname;

    /**
     * 所属部门名称
     */
    private String departmentName;

    /**
     * 我司财务主体名称
     */
    private String companyContractSubject;

    /**
     * 收款账户信息
     */
    private StarSettlementAccountInfoVO starAccountInfoVO;

    /**
     * 结算单明细
     */
    private List<LiveStarSettlementCommodityVO> settlementDetails;

    public String getApprovalStatusName() {
        if (Objects.nonNull(getApprovalStatus())) {
            return LiveStarSettlementStatusEnum.getStatusName(getApprovalStatus());
        }
        return null;
    }
}
